package com.wing.purchase.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.product.model.entity.ProductItem;
import com.wing.purchase.model.entity.PurQualityTestingTask;
import com.wing.purchase.model.entity.PurQualityTestingTaskDetail;
import com.wing.purchase.model.response.PurQualityTestingTaskDetailSearchVo;
import com.wing.purchase.model.response.PurQualityTestingTaskDetailVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * 采购-质检任务-详情Dao
 *
 * @author
 */
@Mapper
public interface PurQualityTestingTaskDetailDao extends BaseMapper<PurQualityTestingTaskDetail> {

    /**
     * 查询质检项目
     * @param productDetailId 物料id
     * @param type 类型
     * @param qualityTestingCategoryId 质检类型id
     * @return
     */
    List<ProductItem> getQualityInfoBy(@Param("productDetailId") Long productDetailId,@Param("type") String type,@Param("qualityTestingCategoryId") Long qualityTestingCategoryId);

    /**
     * 查询质检任务详情
     * @param pg 分页参数
     * @param params 查询参数
     * @return
     */
    List<PurQualityTestingTaskDetailSearchVo> pageList4app(@Param("page") Page<PurQualityTestingTaskDetailSearchVo> pg,@Param("params") Map<String, Object> params);

    /**
     * 查询采购详情
     * @param recordId
     * @return
     */
    PurQualityTestingTaskDetailSearchVo getDetail(@Param("recordId") String recordId);
}
